<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改商品统计信息')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-summary-edit" th:object="${productSummary}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">商品id
                ：</label>
            <div class="col-sm-8">
                <input name="productId" th:field="*{productId}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">点击量
                ：</label>
            <div class="col-sm-8">
                <input name="clickCount" th:field="*{clickCount}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">总销量
                ：</label>
            <div class="col-sm-8">
                <input name="saleCount" th:field="*{saleCount}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">总销售金额
                ：</label>
            <div class="col-sm-8">
                <input name="saleMoney" th:field="*{saleMoney}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">月销量
                ：</label>
            <div class="col-sm-8">
                <input name="monthSaleCount" th:field="*{monthSaleCount}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">月销售金额
                ：</label>
            <div class="col-sm-8">
                <input name="monthSaleMoney" th:field="*{monthSaleMoney}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">评价量
                ：</label>
            <div class="col-sm-8">
                <input name="appraiseCount" th:field="*{appraiseCount}" class="form-control"
                       type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">好评量
                ：</label>
            <div class="col-sm-8">
                <input name="praiseCount" th:field="*{praiseCount}" class="form-control"
                       type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "product/summary";
    $("#form-summary-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-summary-edit').serialize());
        }
    }
</script>
</body>
</html>